# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-schema
pkgver=7.0.1
pkgrel=2
pkgdesc="zope.interface extension for defining data schemas"
arch=('any')
url="https://github.com/zopefoundation/zope.schema"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface' 'python-zope-event')
checkdepends=('python-zope-testrunner' 'python-zope-testing' 'python-zope-i18nmessageid')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/zope.schema/archive/$pkgver.tar.gz")
sha512sums=('35ef47aa059cecced52abaff9a7d5fb1070008ead2526fe1b3f6d11619c28e70c6f3e3a78c299af1a8a6503d510a363a1dded6d8e4dfde90cae45b9ea90bd89f')

build() {
  cd "$srcdir"/zope.schema-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/zope.schema-$pkgver
  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m zope.testrunner --test-path=src
}

package() {
  cd "$srcdir"/zope.schema-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
